{extend name="index@layout" /}
{block name="head_title"}主页{/block}
{block name="nav"}{/block}
{block name="body_content"}
<script type="text/javascript" src="__STATIC__/mui/js/mui.min.js"></script>
<!--幻灯片标签开始---->
{qb:tag name='wap_index_rollpic1' val='listdb' type="images"}
<!--
<link rel="stylesheet" href="__STATIC__/index/default/slider.css">
<div id="slider" class="mui-slider" >
		<div class="mui-slider-group mui-slider-loop">
			<div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="__STATIC__/images/4.jpg"></a></div>
			<div class="mui-slider-item"><a href="#"><img src="__STATIC__/images/1.jpg"></a></div>
			<div class="mui-slider-item"><a href="#"><img src="__STATIC__/images/2.jpg"></a></div>
			<div class="mui-slider-item"><a href="#"><img src="__STATIC__/images/3.jpg"></a></div>
			<div class="mui-slider-item"><a href="#"><img src="__STATIC__/images/4.jpg"></a></div>
			<div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="__STATIC__/images/1.jpg"></a></div>
		</div>
		<div class="mui-slider-indicator">
			<div class="mui-indicator mui-active"></div>
			<div class="mui-indicator"></div>
			<div class="mui-indicator"></div>
			<div class="mui-indicator"></div>
		</div>
</div>
<script type="text/javascript" charset="utf-8">var slider = mui("#slider");</script>
-->
	<!--上面的是演示数据，演示数据可有可无，有的话，必须以注释的形式紧跟在标签后面，下面的就是模板-->
	<!--每一个标签有开始与结尾标志 name就代表标签名，可以中文，不能重复，val就是想得到的变量名 type是指定要什么数据-->
<link rel="stylesheet" href="__STATIC__/index/default/slider.css">
<div id="slider" class="mui-slider" >
	 <div class="mui-slider-group mui-slider-loop">
		<div class="mui-slider-item mui-slider-item-duplicate"><a href="{:end($listdb)['url']}"><img alt="{:end($listdb)['title']}" src="{:end($listdb)['picurl']}"></a></div>
		{volist name="listdb" id="rs"}
		<div class="mui-slider-item"><a href="{$rs.url}"><img alt="{$rs.title}" src="{$rs.picurl}"></a></div>
		{/volist}
		<div class="mui-slider-item mui-slider-item-duplicate"><a href="{$listdb.0.url}"><img alt="{$listdb.0.title}" src="{$listdb.0.picurl}"></a></div>
	</div>
	<div class="mui-slider-indicator">
		{volist name="listdb" id="rs"}
		<div class="mui-indicator {eq name='i' value='1'}mui-active{/eq}"></div>
		{/volist}
	</div>
</div>
<script type="text/javascript" charset="utf-8">var slider = mui("#slider");</script>
{/qb:tag}    
<!--幻灯片标签结束---->

<link rel="stylesheet" href="__STATIC__/index/default/index.css">
<div class="Index_Main_cont">
	<ul class="MainMenu">
{qb:tag name='wap_index_text0' type="textarea"}
		<li><a href="#"><i class="fa fa-photo"></i><p>景点画册</p></a></li>
		<li><a href="#"><i class="fa fa-tags"></i><p>限时特惠</p></a></li>
		<li><a href="#"><i class="si si-handbag"></i><p>旅游商城</p></a></li>
		<li><a href="#"><i class="fa fa-file-text"></i><p>游记攻略</p></a></li>
{/qb:tag}
	</ul>
	<div class="ModConts">
{qb:tag name='wap_index_text1' type="textarea"}
		<div class="head"><div class="tag">当季热门</div><div class="more">不拥挤，享受惬意旅行之美</div></div>
{/qb:tag}
		<div class="ListShops">
{qb:tag name='wap_index_text2' type="shop" rows="3"}
<!--
			<div class="lists">
				<ul>
					<ol><a href="#"><img src="__STATIC__/images/4.jpg"></a></ol>
					<li>
						<div class="title"><a href="#">夏季蓝天白云沙滩海边旅行度假</a></div>
						<div class="fname"><a href="#">限时特惠</a></div>
						<div class="price"><div>&yen; 1022<span>起</span></div></div>
						<div class="time">距离结束<em>38989779</em> <span></span></div>
					</li>
				</ul>
			</div>
			<div class="lists">
				<ul>
					<ol><a href="#"><img src="__STATIC__/images/3.jpg"></a></ol>
					<li>
						<div class="title"><a href="#">夏季蓝天白云沙滩海边旅行度假</a></div>
						<div class="fname"><a href="#">限时特惠</a></div>
						<div class="price"><div>&yen; 3022<span>起</span></div></div>
						<div class="time">距离结束<em>19000</em> <span></span></div>
					</li>
				</ul>
			</div>
-->
			<div class="lists">
				<ul>
					<ol><a href="{$rs.url}"><img src="{$rs.picurl}"></a></ol>
					<li>
						<div class="title"><a href="{$rs.url}">{$rs.title}</a></div>
						<div class="fname"><a href="#">小编推荐</a></div>
						<div class="price"><div>{$rs.view}<span>关注度</span></div></div>
						{php}$time=time()-$rs['create_time'];{/php}
						<div class="time">距离结束<em>{$time}</em> <span></span></div>
					</li>
				</ul>
			</div>
{/qb:tag}
		</div>
		<div class="butters">
			<button type="butter" onclick="showMoreShop('{qb:url name="wap_index_text2"/}')" class="showMoreShop">查看更多</button>
		</div>
	</div>
	<div class="ModConts">
{qb:tag name='wap_index_text3' type="textarea"}
		<div class="head"><div class="tag">旅游攻略</div><div class="more">为您提供更多的旅途服务</div></div>
{/qb:tag}
		<div class="ListArticles">
{qb:tag name='wap_index_text4' type="cms"}
<!--
			<div class="lists"><div><a href="#" class="fname">[云南旅游]</a><a href="#">发现个性价比很高的团，有兴趣的来看看</a></div></div>
			<div class="lists"><div><a href="#" class="fname">[云南旅游]</a><a href="#">发现个性价比很高的团，有兴趣的来看看</a></div></div>
			<div class="lists"><div><a href="#" class="fname">[云南旅游]</a><a href="#">发现个性价比很高的团，有兴趣的来看看</a></div></div>
			<div class="lists"><div><a href="#" class="fname">[云南旅游]</a><a href="#">发现个性价比很高的团，有兴趣的来看看</a></div></div>
-->
			<div class="lists"><div><a href="{$rs.sort_url}" class="fname">[{$rs.sort_name}]</a><a href="{$rs.url}">{$rs.title}</a></div></div>			
{/qb:tag}
		</div> 
		<div class="butters butters1">
			<button type="butter" onclick="showMoreArticle('{qb:url name="wap_index_text4"/}')" class="showMoreArticle">查看更多</button>
		</div>
	</div>
</div> 
<script type="text/javascript" src="__STATIC__/index/default/showtime.js"></script>
<script type="text/javascript">
var shoppage=1;
function showMoreShop(url){	
	shoppage++;
	$.get(url+shoppage+'&'+Math.random(),function(res){
		if(res.code==0){
			if(res.data==''){
				layer.msg("已经显示完了！",{time:500});
				$('.showMoreShop').attr('onclick','');
				$('.showMoreShop').html('显示完了');
				$('.showMoreShop').css({'background':'#CCC'});
			}else{
				res.data="<span class='pages"+shoppage+"'>"+res.data+"</span>";			
				$('.ListShops').append(res.data);
				$('.ListShops .pages'+shoppage).hide();
				$('.ListShops .pages'+shoppage).show(500);
			}
		}else{
			layer.msg(res.msg,{time:2500});
		}
	});
}
var articlepage=1;
function showMoreArticle(url){	
	articlepage++;
	$.get(url+articlepage+'&'+Math.random(),function(res){
		if(res.code==0){
			if(res.data==''){
				layer.msg("已经显示完了！",{time:500});
				$('.showMoreArticle').attr('onclick','');
				$('.showMoreArticle').html('显示完了');
				$('.showMoreArticle').css({'background':'#CCC'});
			}else{
				res.data="<span class='pages"+articlepage+"'>"+res.data+"</span>";			
				$('.ListArticles').append(res.data);
				$('.ListArticles .pages'+articlepage).hide();
				$('.ListArticles .pages'+articlepage).show(500);
			}
		}else{
			layer.msg(res.msg,{time:2500});
		}
		
	});
}
var checktime=0;
function show_time(){
	checktime++;
	$('.ListShops .lists .time').each(function(){
		var thetime=parseInt($(this).find('em').html())-checktime;
		$(this).find('span').html(format_time(thetime));
	});
}
setInterval("show_time()",1000);
</script>
{/block}